Proof of Correctness of Object Representations 3

نویسنده

  • Joseph A. Goguen
چکیده

1.1 Introduction This paper presents an algebraic account of implementation that is applicable to the object paradigm. The key to its applicability is the notion of state: objects have local states that are observable only through their outputs. That is, objects may be viewed as abstract machines with hidden local state (as in 9]). Consequently, a correct implementation need only have the required visible behaviour. We use hidden order sorted algebra to formalise the object paradigm 4, 5, 8]. Advantages of an algebraic approach include a high level of intellectual rigour, a large body of supporting mathematics, and simple, eecient proofs using only equa-tional logic. A wide variety of extensions to equational logic have been developed to treat various programming features, while preserving its essential simplicity. For example, order sorted equational logic uses a notion of subsort to treat computations that may raise exceptions or fail to terminate. Hidden sorted logic extends standard equational logic to capture an important distinction between immutable data types, such as booleans and integers, and mu-table objects, such as program variables and database entities. The terms abstract data types and abstract object classes refer to these two kinds of entity. The former represent`visible' data values; the latter represent data stored in a hidden state. In hidden sorted equational logic, an equation of hidden sort need not be satissed in the usual sense, but only up to observability, in that only its visible consequences need hold. Thus, hidden sorted logic allows greater freedom in implementations. The simplicity of the underlying logic is important, because we want a tractable approach in which implementations are as easily expressible and provable as possible. A speciication is just a set of sentences in some logical system: that is, a theory. An algebraic speciication is then a set of equations. An implementation is expressed by a theory morphism, which says how to interpret a theory into its implementation in such a way that each model of the concrete theory gives a model of the abstract theory. In this respect, our approach is similar to the seminal work of 1

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Formal Verification of a Java Compiler in Isabelle

This paper reports on the formal proof of correctness of a compiler from a substantial subset of Java source language to Java bytecode in the proof environment Isabelle. This work is based on extensive previous formalizations of Java, which comprise all relevant features of object-orientation. We place particular emphasis on describing the effects of design decisions in these formalizations on ...

متن کامل

Case Studies in Meta-Level Theorem Proving

We describe an extension of the Pvs system that provides a reasonably eecient and practical notion of reeection and thus allows for soundly adding formalized and veriied new proof procedures. These proof procedures work on representations of a part of the underlying logic and their correctness is expressed at the object level using a computational reeection function. The implementation of the P...

متن کامل

Balancing Lists: A Proof Pearl

Starting with an algorithm to turn lists into full trees which uses non-obvious invariants and partial functions, we progressively encode the invariants in the types of the data, removing most of the burden of a correctness proof. The invariants are encoded using non-uniform inductive types which parallel numerical representations in a style advertised by Okasaki, and a small amount of dependen...

متن کامل

Coinductive Proofs for Basic Real Computation

We describe two representations for real numbers, signed digit streams and Cauchy sequences. We give coinductive proofs for the correctness of functions converting between these two representations to show the adequacy of signed digit stream representation. We also show a coinductive proof for the correctness of a corecursive program for the average function with regard to the signed digit stre...

متن کامل

Program Extraction in Simply-Typed Higher Order Logic

Based on a representation of primitive proof objects as λterms, which has been built into the theorem prover Isabelle recently, we propose a generic framework for program extraction. We show how this framework can be used to extract functional programs from proofs conducted in a constructive fragment of the object logic Isabelle/HOL. A characteristic feature of our implementation of program ext...

متن کامل

Exact Heap Summaries for Symbolic Execution

A recent trend in the analysis of object-oriented programs is the modeling of references as sets of guarded values, enabling multiple heap shapes to be represented in a single state. A fundamental problem with using these guarded value sets is the inability to generate test inputs in a manner similar to symbolic execution based analyses. Although several solutions have been proposed, none have ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007